get Or Throw
inline fun <T> Array<out T>.getOrThrow(index: Int, message: Array<out T>.(Int) -> String): T(source)
inline fun BooleanArray.getOrThrow(index: Int, message: BooleanArray.(Int) -> String): Boolean(source)
Returns an element at the given index or throws IndexOutOfBoundsException with the message if the index is out of bounds.
inline fun <K, V> Map<K, V>.getOrThrow(key: K, message: Map<K, V>.(K) -> String = { MISSING_KEY }): V(source)
Returns an element at the given key or throws NoSuchElementException with the message if the key is not present.